3.96 \(\int \frac {(a+b \log (c x^n))^2}{x (d+e x)} \, dx\)

Optimal. Leaf size=79 \[ \frac {2 b n \text {Li}_2\left (-\frac {d}{e x}\right ) \left (a+b \log \left (c x^n\right )\right )}{d}-\frac {\log \left (\frac {d}{e x}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d}+\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {d}{e x}\right )}{d} \]

[Out]

-ln(1+d/e/x)*(a+b*ln(c*x^n))^2/d+2*b*n*(a+b*ln(c*x^n))*polylog(2,-d/e/x)/d+2*b^2*n^2*polylog(3,-d/e/x)/d

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 98, normalized size of antiderivative = 1.24, number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2344, 2302, 30, 2317, 2374, 6589} \[ -\frac {2 b n \text {PolyLog}\left (2,-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{d}+\frac {2 b^2 n^2 \text {PolyLog}\left (3,-\frac {e x}{d}\right )}{d}-\frac {\log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d}+\frac {\left (a+b \log \left (c x^n\right )\right )^3}{3 b d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(x*(d + e*x)),x]

[Out]

(a + b*Log[c*x^n])^3/(3*b*d*n) - ((a + b*Log[c*x^n])^2*Log[1 + (e*x)/d])/d - (2*b*n*(a + b*Log[c*x^n])*PolyLog
[2, -((e*x)/d)])/d + (2*b^2*n^2*PolyLog[3, -((e*x)/d)])/d

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x (d+e x)} \, dx &=\frac {\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx}{d}-\frac {e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx}{d}\\ &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d}+\frac {\operatorname {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b d n}+\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{x} \, dx}{d}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^3}{3 b d n}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{d}+\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2\left (-\frac {e x}{d}\right )}{x} \, dx}{d}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^3}{3 b d n}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{d}+\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 94, normalized size = 1.19 \[ -\frac {2 b n \left (\text {Li}_2\left (-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )-b n \text {Li}_3\left (-\frac {e x}{d}\right )\right )}{d}-\frac {\log \left (\frac {d+e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d}+\frac {\left (a+b \log \left (c x^n\right )\right )^3}{3 b d n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/(x*(d + e*x)),x]

[Out]

(a + b*Log[c*x^n])^3/(3*b*d*n) - ((a + b*Log[c*x^n])^2*Log[(d + e*x)/d])/d - (2*b*n*((a + b*Log[c*x^n])*PolyLo
g[2, -((e*x)/d)] - b*n*PolyLog[3, -((e*x)/d)]))/d

________________________________________________________________________________________

fricas [F]  time = 0.50, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \log \left (c x^{n}\right )^{2} + 2 \, a b \log \left (c x^{n}\right ) + a^{2}}{e x^{2} + d x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(e*x+d),x, algorithm="fricas")

[Out]

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(e*x^2 + d*x), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )} x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/((e*x + d)*x), x)

________________________________________________________________________________________

maple [C]  time = 0.47, size = 2315, normalized size = 29.30 \[ \text {Expression too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)^2/x/(e*x+d),x)

[Out]

b^2*ln(x^n)^2/d*ln(x)-b^2/d*ln(e*x+d)*ln(x^n)^2-b^2/d*ln(e*x+d)*n^2*ln(x)^2-b^2*n^2/d*ln(x)^2*ln(1/d*e*x+1)-2*
b^2*n^2/d*ln(x)*polylog(2,-1/d*e*x)+2*b^2*n^2/d*dilog((e*x+d)/d)*ln(x)+2*b^2*n^2/d*ln(x)^2*ln((e*x+d)/d)+I*ln(
x^n)/d*ln(x)*b^2*Pi*csgn(I*c*x^n)^2*csgn(I*c)+1/d*ln(x)*ln(c)^2*b^2-1/d*ln(e*x+d)*ln(c)^2*b^2+1/3*b^2*n^2/d*ln
(x)^3+2*b^2*n^2/d*polylog(3,-1/d*e*x)-a^2/d*ln(e*x+d)+a^2/d*ln(x)-I*n/d*ln(e*x+d)*ln(-1/d*e*x)*b^2*Pi*csgn(I*x
^n)*csg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-1/4/d*ln(x)*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4+1/2/d*ln(x)*Pi^
2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^5

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -a^{2} {\left (\frac {\log \left (e x + d\right )}{d} - \frac {\log \relax (x)}{d}\right )} + \int \frac {b^{2} \log \relax (c)^{2} + b^{2} \log \left (x^{n}\right )^{2} + 2 \, a b \log \relax (c) + 2 \, {\left (b^{2} \log \relax (c) + a b\right )} \log \left (x^{n}\right )}{e x^{2} + d x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(e*x+d),x, algorithm="maxima")

[Out]

-a^2*(log(e*x + d)/d - log(x)/d) + integrate((b^2*log(c)^2 + b^2*log(x^n)^2 + 2*a*b*log(c) + 2*(b^2*log(c) + a
*b)*log(x^n))/(e*x^2 + d*x), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x\,\left (d+e\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2/(x*(d + e*x)),x)

[Out]

int((a + b*log(c*x^n))^2/(x*(d + e*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{x \left (d + e x\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x/(e*x+d),x)

[Out]

Integral((a + b*log(c*x**n))**2/(x*(d + e*x)), x)

________________________________________________________________________________________